<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Cesium App</title>
    <script src="./script/Cesium/Cesium.js"></script>
    <link rel="stylesheet" href="./script/Cesium/Widgets/widgets.css" />
    <style>
      html,
      body {
        height: 100%;
        margin: 0px;
        padding: 0px;
      }
    </style>
  </head>
  <body>
    <div id="cesiumContainer" style="width: 100%"></div>
    <script>
      const geeMetadata = new Cesium.GoogleEarthEnterpriseMetadata(
        "http://www.earthenterprise.org/3d"
      );
      const gee = new Cesium.GoogleEarthEnterpriseImageryProvider({
        metadata: geeMetadata,
      });

      var guge = new Cesium.UrlTemplateImageryProvider({
        url: "http://www.google.cn/maps/vt?lyrs=s@800&x={x}&y={y}&z={z}",
        tilingScheme: new Cesium.WebMercatorTilingScheme(),
        minimumLevel: 1,
        maximumLevel: 20,
      });

      const guge2 = new Cesium.UrlTemplateImageryProvider({
        url: "http://mt1.google.cn/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali",
      });

      const viewer = new Cesium.Viewer("cesiumContainer", {
        baseLayerPicker: false,
        navigationHelpButton: false,
        sceneModePicker: false,
        imageryProvider: guge2,
      });

      viewer.camera.setView({
        destination: new Cesium.Cartesian3.fromDegrees(116.39, 39.9, 15000.0),
        orientation: {
          heading: Cesium.Math.toRadians(45.0), // east, default value is 0.0 (north)
          pitch: Cesium.Math.toRadians(-45), // default value (looking down)
          roll: 0.0, // default value
        },
      });

      setTimeout(() => {
        viewer.camera.flyTo({
          destination: new Cesium.Cartesian3(
            -2200204.3080810755,
            4393708.890630293,
            4054015.9096624707
          ),
          orientation: {
            heading: 2.8726264612450545, // east, default value is 0.0 (north)
            pitch: -0.4851716632483827, // default value (looking down)
            roll: 0.0, // default value
          },
        });
      }, 5000);
      //viewer.camera.postion;
      //viewer.camera.heading;
      //viewer.camera.pitch;
      //       viewer.camera.setView({
      //         destination: new Cesium.Cartesian3(
      //           -2200204.3080810755,
      //           4393708.890630293,
      //           4054015.9096624707
      //         ),
      //         orientation: {
      //           heading: 2.8726264612450545, // east, default value is 0.0 (north)
      //           pitch: -0.4851716632483827, // default value (looking down)
      //           roll: 0.0, // default value
      //         },
      //       });
    </script>
  </body>
</html>
